package org.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

@Data
@TableName(value = "users")
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField(value = "account")
    private String account;
    @TableField("nickname") // 二进制数据字段（核心）
    private String nickname;
    @TableField("avatar") // 二进制数据字段（核心）
    private String avatar;
    @TableField(value = "password")
    @JsonIgnore
    private String password;
    @TableField(value = "role")
    private Long role;
}
